/**
 * ReportGear(2011)
 */
package com.reportgear.designer.startup;

import java.awt.event.KeyEvent;
import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;

import javax.print.attribute.HashPrintRequestAttributeSet;

/**
 * 
 * 
 * @version 1.0 2011-4-18
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class Test {
	public static void main(String[] args) {
		String a = "岗位工资层级[3027858]+岗位工资[3011341]*12.5/ 12*(123)";

		a  = a.replaceAll("[^\\d|+|-|*|/|\\[|\\]|(|)]", "");
		System.out.println(a);
		a = a.replaceAll("\\[(\\d+)\\]", "D$1");
		System.out.println(a);
		// PrinterJob job = PrinterJob.getPrinterJob();
		//
		// HashPrintRequestAttributeSet attrbutes = new
		// HashPrintRequestAttributeSet();
		//		
		// PageFormat format = job.pageDialog(attrbutes);
		// if(job.printDialog(attrbutes)){
		// System.out.println("DDDDDDDDDDDDDD");
		// }
	}
}
